package com.wedimob.slideshare.parser.strategy;

import org.jsoup.nodes.Element;

import com.wedimob.slideshare.parser.annotation.ExtractionStrategy;

public class YoutubeImageStrategy implements ExtractionStrategy {

    @Override
    public String extract(Element element, String txt) {
        String res = element.attr("data-thumb");
        if(res == null || res.length() == 0)
            return element.attr("src");
        
        return res;
    }
}
